
const {db,close} = require('../db');
const {ObjectId} = require('mongodb')



const aboutMe = db.collection('aboutMe');

const ID = '627277c69b198cb38f315234';


function add(data){
    aboutMe.insertOne(data,(error,result)=>{
        if(error) throw error
        console.log(result)
    })
}


function find(){
    aboutMe.find({_id:ObjectId(ID)}).toArray((error,data)=>{
        if(error) throw error
        console.log(data)
    })
}

function update(data){
    return  aboutMe.updateOne({_id:ObjectId(ID)},data)
}


find()




